GAME.Name = "MP Draughts"
GAME.Author = "Devenger"
GAME.Version = "broken for now"
GAME.Selectable = false

local scrSize = tgm.ScreenSize

surface.CreateFont ("Draughts Utrecht", scrSize * 0.12, 500, false, false, "Draughts120")

GAME.OnBoard = false
GAME.PlayingAs = 1
GAME.Opponent = false
GAME.Turn = 1

include (GAME.fullpath.."/menu.lua")
include (GAME.fullpath.."/board_handle.lua")
include (GAME.fullpath.."/board_draw.lua")
include (GAME.fullpath.."/movement_rules.lua")
include (GAME.fullpath.."/communication.lua")

function GAME:Initialize ()
	self:ClearBoard()
	self:SetupBoard()
end

function GAME:StartGame ()
	self:ClearBoard()
	self:SetupBoard()
	self.Turn = 1
	self.OnBoard = true
end

function GAME:Render ()
	if self.OnBoard then
		self:RenderBoard()
	else
		self:RenderMenu()
	end
end

--temp
function GAME:BindPressed (bind)
	if bind == "+jump" then
		--self.OnBoard = not self.OnBoard
	elseif bind == "+attack" then
		if self.OnBoard then
			self:OnSelect()
		else
			print ("Selecting in menu")
			self:OnSelectInMenu()
		end
	end
end
